////////////////////////////////////////////////////////////////////////////////
// Copyright 2007 CORE Solutions Limited
// All rights reserved.
// PROPRIETARY AND CONFIDENTIAL INFORMATION.
// Use is subject to license terms.
//
// FUNCTION ID      :   CATALOG_SECURITY
// AUTHOR           :   Saint Peng 
// DATE CREATE      :   2007/03/29
// DESCRIPTION      :   a SEARCH FORM file for the function, CATALOG_SECURITY
//                  :   
//                  :   
//                  :   
//
// MODIFICATION HISTORY:
// DATE         AUTHOR          VERSION NO.         COMMENT
// -----------  --------------  ------------------  -------------------
// 2007/03/29   Saint Peng      1.0                 source is generated.
//
//
//
////////////////////////////////////////////////////////////////////////////////

package com.erp.app.catalog.catalogSecurity.web;

import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;
import javax.servlet.http.HttpSession;

import org.apache.struts.action.ActionError;
import org.apache.struts.action.ActionErrors;
import org.apache.struts.action.ActionForm;
import org.apache.struts.action.ActionMapping;

import com.erp.framework.controller.form.SimpleSearchStyleForm;
import com.erp.app.util.web.ActionErrorUtil;
import com.erp.framework.util.CommonUtil;
import com.erp.framework.util.logger.Logger;

/**
* <p>A <strong>SearchForm</strong> is a JavaBean which provides property
* getter and setter methods for all of the bean properties, and implements
* <code>Serializable</code>, as required by the JavaBean specification
* The main purpose for this bean is to get the user search criteria input
* from the web browsers.
*
* @author          Saint Peng 
* @version 1.0     2007/03/29
* @since           FrameWork 1.0
*
*/

// Note:
// Currently only generates the first 5 fields of a table
// (excluding the COMPANY_CODE field).
// However, this number can be set in GenConstants.NO_CRITERIA

public class CatalogSecuritySearchForm extends SimpleSearchStyleForm {

	//Searching Criteria Attributes (DB Table Name: T_CATALOG_SECURITY_HDR)
	private String srchCompanyCode;                  //DB Column Name: COMPANY_CODE
	private String srchHdrStatus;                    //DB Column Name: STATUS
	private String srchUserCodeFr;                   //DB Column Name: USER_CODE
	private String srchUserCodeTo;                   //DB Column Name: USER_CODE
	private String srchHdrUserIdFr;                  //DB Column Name: USER_ID
	private String srchHdrUserIdTo;                  //DB Column Name: USER_ID
	private String srchHdrUserNameFr;                //DB Column Name: USER_NAME
	private String srchHdrUserNameTo;                //DB Column Name: USER_NAME
	private String srchHdrUserGroupCodeFr;           //DB Column Name: USER_GROUP_CODE
	private String srchHdrUserGroupCodeTo;           //DB Column Name: USER_GROUP_CODE
	private String srchHdrCatalogUserIdFr;           //DB Column Name: CATALOG_USER_ID
	private String srchHdrCatalogUserIdTo;           //DB Column Name: CATALOG_USER_ID
	
	private String srchRoleGroupIdFr;
	private String srchRoleGroupIdTo;
	private String srchLoginParty;

	private String editCatalog_securityNo;
	private String editUserCode;

//	The following classes can be used to access common utilities,
//	delegate methods, and common validation functions.
//	private CatalogSecurityCommonUtil util = new CatalogSecurityCommonUtil();
//	private CatalogSecurityCommonDelegate dg = new CatalogSecurityCommonDelegate();
	private CatalogSecurityCommonValidator validator = new CatalogSecurityCommonValidator();

	/**
	* Validate the properties that have been set for this non-HTTP request,
	* and return an <code>ActionErrors</code> object that encapsulates any
	* validation errors that have been found.  If no errors are found, return
	* <code>null</code> or an <code>ActionErrors</code> object with no
	* recorded error messages.
	* <p>
	* The default implementation attempts to forward to the HTTP version of
	* this method.
	*
	* @param      the action errors array
	* @author     Saint Peng 
	* @since      Framework 1.0
	*/
	public void validateSearch(ActionErrors errors) {

		validator.validateSearch(errors, this);
	}

	/**
	* Validate the properties that have been set for this non-HTTP request,
	* and return an <code>ActionErrors</code> object that encapsulates any
	* validation errors that have been found.  If no errors are found, return
	* <code>null</code> or an <code>ActionErrors</code> object with no
	* recorded error messages.
	* <p>
	* The default implementation attempts to forward to the HTTP version of
	* this method.
	*
	* @param      mapping      the action mapping
	* @param      formIn       the action form
	* @param      request      the http request
	* @param      response     the http response
	* @param      errors       the action errors array
	* @author     Saint Peng 
	* @since      Framework 1.0
	*/
	public void moreValidateSearch(ActionMapping mapping, ActionForm formIn,
		HttpServletRequest request, HttpServletResponse response, ActionErrors errors) {

		validator.moreValidateSearch(mapping, formIn, request, response, errors);
	}

	/**
	* Converts to a string representing the data in this object.
	* A new <code>String</code> object is allocated and initialized to 
	* contain the character sequence currently represented by this 
	* object. This <code>String</code> is then returned. Subsequent 
	* changes to this object do not affect the contents of the 
	* <code>String</code>. 
	*
	* @return     a string representation of the object.
	* @see        java.lang.Object#toString()
	* @author     Saint Peng 
	* @since      Framework 1.0
	*/
	public String toString() {
		String pkStr = "PK: {srchUserCodeFr = " + this.srchUserCodeFr
			+ "\n, srchUserCodeTo = " + this.srchUserCodeTo + "}\n";

		String colStr = "COL: {srchHdrUserIdFr = " + this.srchHdrUserIdFr
			+ "\n, srchHdrUserIdTo = " + this.srchHdrUserIdTo
			+ "\n, srchHdrUserNameFr = " + this.srchHdrUserNameFr
			+ "\n, srchHdrUserNameTo = " + this.srchHdrUserNameTo
			+ "\n, srchHdrUserGroupCodeFr = " + this.srchHdrUserGroupCodeFr
			+ "\n, srchHdrUserGroupCodeTo = " + this.srchHdrUserGroupCodeTo
			+ "\n, srchHdrCatalogUserIdFr = " + this.srchHdrCatalogUserIdFr
			+ "\n, srchHdrCatalogUserIdTo = " + this.srchHdrCatalogUserIdTo + "}\n";

		String mandatoryStr = "{srchCompanyCode = " + this.srchCompanyCode
			+ "\n, srchHdrStatus = " + this.srchHdrStatus
			+ "}\n";

		String editStr = "{editCatalog_securityNo = " + this.editCatalog_securityNo + "}";

		return "toString() is:\n" + mandatoryStr + pkStr + colStr + editStr;
	}

	////////////////////////////////////////////////////////////////////////////////
	//Generated Accessors (get/set methods) for searching criterias
	////////////////////////////////////////////////////////////////////////////////

	public String getSrchCompanyCode() {
		return this.srchCompanyCode;
	}

	public String getSrchHdrStatus() {
		return this.srchHdrStatus;
	}

	public String getSrchUserCodeFr() {
		return this.srchUserCodeFr;
	}

	public String getSrchUserCodeTo() {
		return this.srchUserCodeTo;
	}

	public String getSrchHdrUserIdFr() {
		return this.srchHdrUserIdFr;
	}

	public String getSrchHdrUserIdTo() {
		return this.srchHdrUserIdTo;
	}

	public String getSrchHdrUserNameFr() {
		return this.srchHdrUserNameFr;
	}

	public String getSrchHdrUserNameTo() {
		return this.srchHdrUserNameTo;
	}

	public String getSrchHdrUserGroupCodeFr() {
		return this.srchHdrUserGroupCodeFr;
	}

	public String getSrchHdrUserGroupCodeTo() {
		return this.srchHdrUserGroupCodeTo;
	}

	public String getSrchHdrCatalogUserIdFr() {
		return this.srchHdrCatalogUserIdFr;
	}

	public String getSrchHdrCatalogUserIdTo() {
		return this.srchHdrCatalogUserIdTo;
	}

	public String getEditCatalog_securityNo() {
		return this.editCatalog_securityNo;
	}

	public void setSrchCompanyCode(String srchCompanyCode) {
		this.srchCompanyCode = srchCompanyCode;
	}

	public void setSrchHdrStatus(String srchHdrStatus) {
		this.srchHdrStatus = srchHdrStatus;
	}

	public void setSrchUserCodeFr(String srchUserCodeFr) {
		this.srchUserCodeFr = srchUserCodeFr;
	}

	public void setSrchUserCodeTo(String srchUserCodeTo) {
		this.srchUserCodeTo = srchUserCodeTo;
	}

	public void setSrchHdrUserIdFr(String srchHdrUserIdFr) {
		this.srchHdrUserIdFr = srchHdrUserIdFr;
	}

	public void setSrchHdrUserIdTo(String srchHdrUserIdTo) {
		this.srchHdrUserIdTo = srchHdrUserIdTo;
	}

	public void setSrchHdrUserNameFr(String srchHdrUserNameFr) {
		this.srchHdrUserNameFr = srchHdrUserNameFr;
	}

	public void setSrchHdrUserNameTo(String srchHdrUserNameTo) {
		this.srchHdrUserNameTo = srchHdrUserNameTo;
	}

	public void setSrchHdrUserGroupCodeFr(String srchHdrUserGroupCodeFr) {
		this.srchHdrUserGroupCodeFr = srchHdrUserGroupCodeFr;
	}

	public void setSrchHdrUserGroupCodeTo(String srchHdrUserGroupCodeTo) {
		this.srchHdrUserGroupCodeTo = srchHdrUserGroupCodeTo;
	}

	public void setSrchHdrCatalogUserIdFr(String srchHdrCatalogUserIdFr) {
		this.srchHdrCatalogUserIdFr = srchHdrCatalogUserIdFr;
	}

	public void setSrchHdrCatalogUserIdTo(String srchHdrCatalogUserIdTo) {
		this.srchHdrCatalogUserIdTo = srchHdrCatalogUserIdTo;
	}

	public void setEditCatalog_securityNo(String editCatalog_securityNo) {
		this.editCatalog_securityNo = editCatalog_securityNo;
	}

	public String getSrchLoginParty() {
		return srchLoginParty;
	}

	public void setSrchLoginParty(String srchLoginParty) {
		this.srchLoginParty = srchLoginParty;
	}

	public String getSrchRoleGroupIdFr() {
		return srchRoleGroupIdFr;
	}

	public void setSrchRoleGroupIdFr(String srchRoleGroupIdFr) {
		this.srchRoleGroupIdFr = srchRoleGroupIdFr;
	}

	public String getSrchRoleGroupIdTo() {
		return srchRoleGroupIdTo;
	}

	public void setSrchRoleGroupIdTo(String srchRoleGroupIdTo) {
		this.srchRoleGroupIdTo = srchRoleGroupIdTo;
	}

	public String getEditUserCode() {
		return editUserCode;
	}

	public void setEditUserCode(String editUserCode) {
		this.editUserCode = editUserCode;
	}



	

	////////////////////////////////////////////////////////////////////////////////
	//Other Accessors (get/set methods)
	////////////////////////////////////////////////////////////////////////////////


}
